package com.wuchao.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuchao.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wuchao.vo.UserVO;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author wuchao
 * @since 2023-12-12
 */
public interface UserMapper extends BaseMapper<User> {
    List<User> findUserList(@Param("userPage") Page<User> userPage, @Param("userVO") UserVO userVO);

    //只需要你的名字
    @Select(" select * from tb_user where username=#{username,jdbcType=VARCHAR}")
    User loadUserByUsername(@Param("username") String username);

}
